//
// Created by francklinson on 2021/7/25 AT 22:28.
//
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

class Solution {
public:
    vector<int> numMovesStones(int a, int b, int c) {
        vector<int> x{a, b, c};
        sort(x.begin(), x.end());
        if (x[2] - x[0] == 2) return {0, 0};
        if (x[1] - x[0] <= 2 or x[2] - x[1] <= 2) { // a b 或者 b c 之间相差<=2
            return {1, x[2] - x[0] - 2};
        } else
            return {2, x[2] - x[0] - 2};
    }
};

int main() {
    Solution solution;
    auto ans = solution.numMovesStones(3, 5, 1);
    for (auto &x:ans) cout << x << endl;
    return 0;
}

